Mod Name / Version: Prevent incorrectly structured email addresses from being hyperlinked <br /> <br />Description: This modification prevents incorrectly structured email addresses from being hyperlinked. <br /> <br />* Should work in versions other than the one listed, although I cannot guarantee. <br /> <br />Working Under: UBB.Threads 6.3 <br /> <br />Mod Status: Finished <br /> <br />Any pre-requisites: <br /> <br />Author(s): Twisty <br /> <br />Date: 07/12/04 <br /> <br />Credits: <br /> <br />Files Altered: ubbt.inc.php <br /> <br />New Files: <br /> <br />Database Altered: no <br /> <br />Info/Instructions: In ubbt.inc.php... <br /> <br /> <br />CHANGE THIS: <br /> <br /> $Body = preg_replace("#([\n\r ])([a-z0-9\-_.]+?)@([^, \n\r]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $Body); <br /> <br /> <br />TO THIS: <br /> <br /> $Body = preg_replace("#([\n\r ])([a-z0-9\-_.]+?)@([a-z0-9\-]+)\.([a-z]+)([,])#i", "\\1<a href=\"mailto:\\2@\\3.\\4\">\\2@\\3.\\4</a>\\5", $Body); <br /> $Body = preg_replace("#([\n\r ])([a-z0-9\-_.]+?)@([a-z0-9\-]+)\.([a-z]+)([ \n\r])#i", "\\1<a href=\"mailto:\\2@\\3.\\4\">\\2@\\3.\\4</a>\\5", $Body); <br /> $Body = preg_replace("#([\n\r ])([a-z0-9\-_.]+?)@([a-z0-9\-]+)\.([a-z]+)([ \n\r])#i", "\\1<a href=\"mailto:\\2@\\3.\\4\">\\2@\\3.\\4</a>\\5", $Body); <br /> <br /> <br />* Yes, the last line repeats. This is intentional in order to obtain the desired result. <br /> <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
116727-mod.txt (10 downloads)